[SPARK-15615][SQL][BUILD][FOLLOW-UP] Replace deprecated usage of json(RDD[String]) API#17071
[SPARK-15615][SQL][BUILD][FOLLOW-UP] Replace deprecated usage of json(RDD[String]) API#17071HyukjinKwon wants to merge 1 commit intoapache:masterfrom
Conversation
|
Let me please cc both @cloud-fan and @srowen |
There was a problem hiding this comment.
can we use spark.createDataset here?
There was a problem hiding this comment.
can we switch to DataFrameWriter with text format?
There was a problem hiding this comment.
Opps, let me fix this one too.
|
Test build #73478 has finished for PR 17071 at commit
|
srowen
left a comment
There was a problem hiding this comment.
I agree we shouldn't use the deprecated method in non-test code. Even a lot of the test occurrences can be updated. I suppose there should be at least one test that the deprecated method still works?
|
Oh, no. I think I updated all instances. Let me maybe leave one case in |
|
Test build #73483 has finished for PR 17071 at commit
|
|
Test build #73484 has finished for PR 17071 at commit
|
|
I left single usage in |
|
Test build #73490 has finished for PR 17071 at commit
|
|
Test build #73488 has finished for PR 17071 at commit
|
|
Test build #73489 has finished for PR 17071 at commit
|
|
I like it, though, regarding still testing the deprecated method -- maybe it's best to even have a test that is explicitly just for testing the old method? that may be clearer than just picking some test from among another batch to leave with the old behavior. It might mean actually adding one new small test case in the generic JSON test suite for this purpose. What do you think? |
|
Sure, sounds better and I can't find a reason to not follow. Let me maybe add single small Java one somewhere because the deprecated Java one calls the deprecated Scala one. |
4cef1c6 to
6f35ee3
Compare
|
Test build #73506 has finished for PR 17071 at commit
|
|
thanks, merging to master! |
What changes were proposed in this pull request?
This PR proposes to replace the deprecated
json(RDD[String])usage tojson(Dataset[String]).This currently produces so many warnings.
How was this patch tested?
Fixed tests.